/**
 * 
 */
package com.googolmo.NowPlaying.View;

import com.googolmo.NowPlaying.Constant;
import com.googolmo.NowPlaying.NPUtils;

import android.content.Context;
import android.preference.CheckBoxPreference;
import android.util.AttributeSet;
import android.util.Log;

/**
 * @author googolmo
 * 
 */
public class EnableCheckBox extends CheckBoxPreference {

	private Context mContext;

	public EnableCheckBox(Context context) {
		super(context);
		this.mContext = context;

	}

	public EnableCheckBox(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		this.mContext = context;
	}

	public EnableCheckBox(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.mContext = context;
	}

	@Override
	protected void onClick() {
		super.onClick();
		Log.d(Constant.TAG, "EnableCheckBox----->isChecked=" + isChecked());
		NPUtils.enableNP(this.mContext, isChecked());
	}

}
